Skip to content

Add MongoClient and Database objects #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 16, 2015

Conversation

bjori
Copy link
Contributor

@bjori bjori commented Mar 12, 2015

No description provided.


public function selectDatabase($databaseName, WriteConcern $writeConcern = null, ReadPreference $readPreferences = null)
{
return new Database($this->manager, "{$databaseName}", $writeConcern, $readPreferences);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't "{$databaseName}" redundant? I assume Database's constructor can do a string cast.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, its because I first did selectCollection() and then selectDatabase() copied from that :)
Fixed

@bjori bjori force-pushed the mc-and-db-objects branch from 8c5b4db to b42d45c Compare March 12, 2015 21:34
use MongoDB\Database;
use MongoDB\Collection;

class MongoClient
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consider switching this to Client, as "Mongo" is redundant here.

@bjori bjori force-pushed the mc-and-db-objects branch from b42d45c to acefa85 Compare March 16, 2015 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants